package com.lyy.service.impl;

import com.lyy.dao.IAccountDao;
import com.lyy.domain.Account;
import com.lyy.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountServiceImpl implements IAccountService {

    @Autowired
    @Qualifier(value = "accountDaoImpl2")
    private IAccountDao accountDao;
    @Override
    public List<Account> findAll() {
        return accountDao.findAll();
    }

    @Override
    public void insert(Account account) {
    accountDao.insert(account);
    }

    @Override
    public Account findById(String id) {
        return accountDao.findById(id);
    }

    @Override
    public void delete(String id) {
        accountDao.delete(id);
    }
}
